﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using dpdw.Structure.CompositePattern;

namespace dpdw.testing.Structure
{
    [TestClass]
    public class TestCompositePattern
    {
        [TestMethod]
        public void TestCompositePatternMethod1()
        {
            System.Diagnostics.Trace.WriteLine("\r\n" + "TestCompositePatternMethod1");

            MenuComponent pancakeHouseMenu = new Menu("PANCAKE HOUSE MENU", "Breakfast");
            MenuComponent dinerMenu = new Menu("DINER MENU", "Lunch");
            MenuComponent cafeMenu = new Menu("CAFE MENU", "Dinner");
            MenuComponent dessertMenu = new Menu("DESSERT MENU", "Dessert of course!");

            MenuComponent allMenus = new Menu("ALL MENUS", "All menus combined!");

            allMenus.Add(pancakeHouseMenu);
            allMenus.Add(dinerMenu);
            allMenus.Add(cafeMenu);

            dinerMenu.Add(new MenuItem("Pasta", "Spaghetti with Marinara Sauce", false, 20.3));
            dinerMenu.Add(new MenuItem("fdsfds", "fdsafds with Marinara Sauce", false, 120.3));
            dinerMenu.Add(new MenuItem("adsg", "fdsafdsa with Marinara Sauce", false, 220.3));
            dinerMenu.Add(new MenuItem("afdsagfdsa", "fdsafdsafsd with Marinara Sauce", false, 320.3));
            dinerMenu.Add(new MenuItem("fdsafdsafsd", "fdsafdsafdsa with Marinara Sauce", false, 420.3));

            dessertMenu.Add(new MenuItem("Apple Pie", "Apple Pie", true, 1.59));
            dinerMenu.Add(dessertMenu);

            Waitress waitress = new Waitress(allMenus);
            waitress.PrintMenu();
        }
    }
}
